-- card: 4689 from stack: in -- bmap block id: 4945 -- flags: 0000 -- background id: 2696 -- name: Typing ----- HyperTalk script ----- on openCard newItem pass openCard end openCard on closeCard resetCountDown put empty into card field "Input" pass closeCard end closeCard -- Check if student is taking too long. on idle global lastTime, count if the seconds - lastTime > 0 then add 1 to count if count > 5 then timesUp else put "Cover" && count into fName hide card field fName put the seconds into lastTime select after line 1 of card field "Input" -- put cursor back end if end if pass idle end idle on timesUp hide card field "Times Up Cover" wrongSound wait 40 ticks show card field "Times Up Cover" newItem end timesUp -- Make new list of item numbers ("1,2,3,4...") on newItemList global itemList repeat with i = 1 to number of lines in card field "Items" put i & "," after itemList end repeat end newItemList -- Pick a random item number from the list (without replacement) -- and use the corresponding line from the item field. on newItem global itemList, curItem if itemList is empty then newItemList -- ran out of items, start over end if put empty into card field "Input" put random(number of items in itemList) into listPick put item listPick of itemList into curItem -- put itemList & " -> " & curItem -- shows how itemList changes delete item listPick of itemList put line curItem of card field "Items" into card field "Word" resetCountDown unlock screen -- make sure screen is unlocked so click will work click at the location of card field "Input" end newItem on resetCountDown global lastTime, count lock screen repeat with f = 1 to 5 put "Cover" && f into fName show card field fName end repeat put 0 into count put the seconds into lastTime unlock screen end resetCountDown on author set the visible of card field "Answers" to not the visible of card field "Answers" set the visible of card field "Items" to not the visible of card field "Items" end author -- part 1 (field) -- low flags: 00 -- high flags: 0002 -- rect: left=45 top=150 right=170 bottom=232 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: Input ----- HyperTalk script ----- on returnInField global curItem if me = line curItem of card field "Answers" then rightSound newItem else wrongSound delete line 1 of me end if end returnInField -- part 2 (field) -- low flags: 80 -- high flags: 0002 -- rect: left=246 top=69 right=295 bottom=365 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 8192 -- line height: 16 -- part name: Items -- part 3 (field) -- low flags: 00 -- high flags: 2001 -- rect: left=38 top=61 right=114 bottom=259 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 4 (field) -- low flags: 01 -- high flags: 2001 -- rect: left=38 top=114 right=142 bottom=237 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 14 -- style flags: 256 -- line height: 18 -- part name: Word -- part 5 (field) -- low flags: 80 -- high flags: 0002 -- rect: left=366 top=69 right=295 bottom=485 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 8192 -- line height: 16 -- part name: Answers -- part 7 (field) -- low flags: 01 -- high flags: 0001 -- rect: left=44 top=216 right=268 bottom=243 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Times Up Cover -- part 8 (field) -- low flags: 01 -- high flags: 0001 -- rect: left=45 top=183 right=205 bottom=73 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Cover 1 -- part 9 (field) -- low flags: 01 -- high flags: 0001 -- rect: left=73 top=183 right=205 bottom=111 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Cover 2 -- part 10 (field) -- low flags: 01 -- high flags: 0001 -- rect: left=111 top=183 right=205 bottom=148 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Cover 3 -- part 11 (field) -- low flags: 01 -- high flags: 0001 -- rect: left=148 top=183 right=205 bottom=183 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Cover 4 -- part 12 (field) -- low flags: 01 -- high flags: 0001 -- rect: left=183 top=183 right=205 bottom=208 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Cover 5 -- part contents for card part 2 ----- text ----- fish frog deer rabbit whale -- part contents for card part 3 ----- text ----- Quickly type the Spanish equivalent of the following word (before your time runs out): -- part contents for card part 4 ----- text ----- deer -- part contents for card part 5 ----- text ----- pez rana ciervo conejo ballena